package com.xiaoxi.bms.mapper.menu;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoxi.bms.domain.menu.BMSMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author xiaoxi
 * @ProjectName springcloudbms
 * @PackageName com.xiaoxi.userserver.mapper.menu
 * @ClassName BMSMenuMapper
 * @Description TODO
 * @Date 2023/2/9 19:28
 * @Version 1.0
 */
@Mapper
public interface BMSMenuMapper extends BaseMapper<BMSMenu> {

    /**
     * 获取用户拥有权限路由
     *
     * @param id
     * @return
     */
    List<BMSMenu> getUserMenu(@Param("id") Long id);


    /**
     * 通过id获取下级所有节点(包含自身)
     * @param id
     * @return
     */
    String findChildrenMenuWithMyself(@Param("id") Long id);


}
